home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / Library / +ORC / Orc pac 8 / HOWTO82.TXT < prev    next >
Encoding:
Text File  |  2000-05-25  |  23.7 KB  |  455 lines

  1.                      HOW TO CRACK, by +ORC, A TUTORIAL
  2.  
  3. ---------------------------------------------------------------------------
  4.  
  5.              Lesson 8.2: How to crack Windows, a deepr approach
  6.  
  7. ---------------------------------------------------------------------------
  8.  
  9.                          [SNAP95] [WINZIP] [WINCAT]
  10.  
  11.                    --------------------------------------
  12.  
  13.      SPECIAL NOTE: Please excuse the somehow "unshaven"
  14.      character of the windows lessons... I'm cracking the
  15.      newest Windows '95 applications right now, therefore
  16.      at times I had to add "on the fly" some corrections to
  17.      the older Windows 3.1 and Windows NT findings.
  18.                 "homines, dum docent, discunt".
  19. ---------------------------------------------------------
  20. ->   1st THING TO REMEMBER
  21. If you thought that DOS was a mess, please notice that windows
  22. 3.1 is a ghastly chaos, and windows 95 a gruesome nightmare of
  23. ill-cooked spaghetti code. Old Basic "GOTO" abominations were
  24. quite elegant in comparison with this concoction... One thing is
  25. sure: This OS will not last... it's way too messy organised,
  26. impossible to consolidate, slow and neurotic (but I must warn
  27. you... I thought exactly the same things about DOS in 1981).
  28.   The most striking thing about windows 95 is that it is neither
  29. meat not fish: neither 16 nor 32... you could call it a "24 bit"
  30. operating system.
  31.   We'll never damage Microsoft interests enough to compensate for
  32. this moronic situation... where you have to wait three minutes
  33. to get on screen a wordprocessor that older OS (and even old DOS)
  34. kick up in 5 seconds. I decide therefore, hic et nunc, to add an
  35. ADDENDUM to this tutorial: Addendum 1 will be dedicated to teach
  36. everybody how to crack ALL Microsoft programs that do exist on
  37. this planet. I'll write it this sommer and give it away between
  38. the "allowed" lessons.
  39.   Anyway you can rely on good WINICE to crack everything, you'll
  40. find it on the web for free, I use version 1.95, cracked by [The
  41. Lexicon] (do not bother me for Warez, learn how to use the search
  42. engines on the web and fish them out yourself). Learn how to use
  43. this tool... read the whole manual! Resist the temptation to
  44. crack immediatly everything in sight... you 'll regret pretty
  45. soon that you did not wanted to learn how to use it properly.
  46. A little tip: as Winice is intended more for software developers
  47. than for crackers, we have to adapt it a little to our purposes,
  48. in order to make it even more effective: a good idea is to have
  49. in the *.DAT initialization file following lines:
  50.      INIT = "CODE ON; watchd es:di; watchd ds:si;"
  51.      TRA = 92
  52. This way you'll always have the hexadecimal notation on, two very
  53. useful watch windows for passwords deprotection and enough buffer
  54. for your traces.
  55.  
  56. WINDOWS 3.1. basic cracking: [ALGEBRAIC PROTECTIONS]
  57.      The most used windows protections are "registration codes",
  58. these must follow a special pattern: have a "-" or a "+" in a
  59. predetermined position, have a particular number in particular
  60. position... and so on.
  61. For the program [SHEZ], for instance, the pattern is to have a
  62. 14 bytes long alphanumeric sequence containing CDCE1357 in the
  63. first 8 bytes.
  64.      The second level of protection is to "connect" such a
  65. pattern to the alphanumeric contents of the NAME of the user...
  66. every user name will give a different "access key". This is the
  67. most commonly used system.
  68.      As most of these protections have a "-" inside the answering
  69. code, you do not need to go through the normal cracking procedure
  70. (described in the next lesson):
  71. *    load WINICE
  72. *    hwnd [name_of_the_crackanda_module]
  73. *    choose the window Handle of the snap, i.e, the exact
  74.      "FIELD" where the code number input arrives... say 091C(2)
  75. *    BMSG 091C WM_GETTEXT
  76. *    Run anew
  77. *    Look at the memory location(s)
  78. *    Do the same for the "Username" input FIELD. (Sometimes
  79.      linked, sometimes not, does not change much, though)
  80. *    BPR (eventually with TRACE) on the memory locations (these
  81.      will be most of the time FOUR: two NUMBERCODES and two
  82.      USERNAMES). The two "mirrored" ones are the most important
  83.      for your crack. At times there will be a "5th" location,
  84.      where the algebraic play will go on...
  85. *    Look at the code that performs algebraic manipulations on
  86.      these locations and understand what it does...
  87. *    Disable the routine or jump over it, or reverse it, or
  88.      defeat it with your own code... there are thousand
  89.      possibilities...
  90. *    Reassemble everything.
  91.  
  92. Uff... quite a long cracking work just to crack some miserable
  93. program... isn'there a quicker way? OF COURSE THERE IS! Actually
  94. there are quite a lot of them (see also the crack of Wincat Pro
  95. below): Look at the following code (taken from SNAP32, a screen
  96. capture utility for Windows 95, that uses a pretty recent
  97. protection scheme):
  98.  
  99.      XOR  EBX,EBX   ; make sure EBX is zeroed
  100.      MOV  BL, [ESI] ; load input char in BL
  101.      INC  ESI       ; point at the next character
  102.      MOV  EDI,EBX   ; save the input character in EDI
  103.      CMP  EBX,+2D   ; input char is a "-" ?
  104.      JZ   ok_it's_a_+_or_a_-
  105.      CMP  EBX,+2B   ; input char is a "+" ?
  106.      JNZ  Jesus_it's_neither_a_minus_nor_a_plus_let's_check_it
  107. :ok_it's_a_+_or_a_-
  108.      XOR  EBX,EBX   ; EBX is zeroed
  109.      MOV  BL,[ESI]  ; recharge BL
  110.      INC  ESI       ; point to next char (do not check - or +)
  111. :Jesus_it's_neither_a_minus_nor_a_plus_let's_check_it
  112.      XOR  EBP,EBP   ; zero EBP
  113.      CMP  DWORD PTR [boguschecker], +01
  114.      ...
  115.  
  116. even if you did not read all my precedent lessons, you do not
  117. need much more explications... this is a part of the algebraic
  118. check_procedure inside the SNAP32 module...  you could also get
  119. here through the usual
  120.      USER!BOZOSLIVEHERE
  121.      KERNEL!HMEMCPY
  122.      USER!GLOBALGETATOMNAME
  123. Windows wretched and detestable APIs used for copy protections,
  124. as usual with WINICE cracking, and as described elsewhere in my
  125. tutorial.
  126.   The above code is the part of the routine that checks for the
  127. presence of a "+" or a "-" inside the registration number (many
  128. protections scheme requires them at a given position, other need
  129. to jump over them).
  130.   Now sit down, make yourself comfortable and sip a good Martini-
  131. Wodka (invariably very useful in order to crack... but be aware
  132. that only Moskowskaia russian Wodka and a correct "Tumball" glass
  133. will do, do not forget the lemon)... what does this "-" stuff
  134. mean for us little crackers?
  135.   It means that we can search directly for the CMP EBX,+2B
  136. sequence inside any file protected with these schemes... and
  137. we'll land smack in the middle of the protection scheme! That's
  138. amazing... but you will never underrate enough the commercial
  139. programmers... the only really amazing thing is how simpleton the
  140. protectionists are! You don't believe me? Try it... you 'll get
  141. your crack at least 4 out of 5 times.
  142.   Yes I know, to find this code is not yet to crack it... but for
  143. this kind of copy protection (that's the reason it is so
  144. widespread) there is no single solution... each makes a slightly
  145. different algebraic manipulation of the alphanumeric and of the
  146. numeric data. It's up to you to crack the various schemes... here
  147. you can only learn how to find them and circumvene them. I'll not
  148. give you therefore a "debug" crack solution. You'll find it
  149. yourself using my indications (see the crack of the Wincat Pro
  150. program below).
  151.  
  152. WHERE ARE THE CODES? WHERE ARE THE MODIFIED FILES? WHERE DO THE
  153. PROTECTIONS KEEP COUNT OF THE PASSING DAYS?
  154. Most of the time the protection schemes use their own *.ini files
  155. in the c:\WINDOWS directory for registration purposes... at time
  156. they even use the "garbage sammler" win.ini file. Let's take as
  157. example WINZIP (versions 5 and 5.5), a very widespread program,
  158. you'll surely have one shareware copy of it somewhere between
  159. your files.
  160.   In theory, winzip should be registered per post, in order to
  161. get a "NEW" copy of it, a "registered" copy.
  162.   This scares most newby crackers, since if the copy you have
  163. it's not full, there is no way to crack it and make it work,
  164. unless you get the REAL stuff. The youngest among us do not
  165. realize that the production of a real "downsized" demo copy is
  166. a very expensive nightmare for the money-infatuated commercial
  167. programmers, and that therefore almost nobody does it really...
  168. nearly all "demos" and "trywares" are therefore CRIPPLED COMPLETE
  169. PROGRAMS, and not "downsized" demos, independently of what the
  170. programmers and the protectionists have written inside them.
  171.   Back to Winzip... all you need, to crack winzip, is to add a
  172. few lines inside the win.ini file, under the heading [WinZip],
  173. that has already been created with the demo version, before the
  174. line with "version=5.0".
  175.  I will not help you any further with this... I'll leave it to
  176. you to experiment with the correct sequences... inside win.ini
  177. you must have following sequence (these are only template to
  178. substitute for your tries inside WINICE... you'll get it, believe
  179. me):
  180.    [WinZip]
  181.    name=Azert Qwerty
  182.    sn=########
  183.    version=5.5
  184.  
  185.   The *important* thing is that this means that you DO NOT NEED
  186. to have a "new registered version" shipped to you in order to
  187. make it work, as the protectionist sellers would like you to
  188. believe. The same applies most of the time... never believe what
  189. you read in the read.me or in the registration files...
  190.   This brings me to a broader question: NEVER believe the
  191. information they give you... never believe what television and/or
  192. newspapers tell you... you can be sure that the only reason they
  193. are notifying you something is to hinder you to read or
  194. understand something else... this stupid_slaves_society can only
  195. subsist if nobody thinks... if you are really interested in what
  196. is going on, real information can be gathered, but surely not
  197. through the "conventional" newspapers and/or news_agencies (and
  198. definitely NEVER through television, that's really only for the
  199. stupid slaves)... yes, some bit of information can be
  200. (laboriously) gathered... it's a cracking work, though.
  201.  
  202. HOW TO CRACK INFORMATION [WHERE WHAT]
  203. *    INTERNET
  204.   In the middle of the hugest junk collection of the planet, some
  205. real information can be laboriously gathered if you do learn how
  206. to use well the search engines (or if you do build your ones...
  207. my spiders are doing most of the work for me... get your robots
  208. templates from "Harvest" or "Verify" and start your "spider
  209. building" activity beginning from Martijn Koster's page). As
  210. usual in our society, in the Internet the real point is exactly
  211. the same point you'll have to confront all your life long: HOW
  212. TO THROW AWAY TONS OF JUNK, HOW TO SECLUDE MYRIADS OF USELESS
  213. INFORMATION and HOW TO FISH RARE USEFUL INFORMATION, a very
  214. difficult art to learn per se. Internet offers some information,
  215. though, mainly BECAUSE it's (still) unregulated. You want a
  216. proof? You are reading it.
  217.  
  218. *    SOME (RARE) NEWSPAPERS.
  219.   The newspaper of the real enemies, the economic powers that
  220. rule this slaves world, are paradoxically most of the time the
  221. only ones worth studying... somewhere even the real rulers have
  222. to pass each other some bits of real information. The "Neue
  223. Zuercher Zeitung", a newspaper of the Swiss industrials from
  224. Zuerich, is possibly the best "not_conformist trend analyzer"
  225. around that you can easily find (even on the web). These
  226. swissuckers do not give a shit for ideology, nor preconcerted
  227. petty ideas, the only thing they really want is to sell
  228. everywhere their ubiquitous watches and their chocolates... in
  229. order to do it, a land like Switzerland, with very high salaries
  230. and a good (and expensive) social system, must use something
  231. brilliant... they found it: a clear vision of the world... as a
  232. consequence this newspaper is very often "against" the trend of
  233. all the other medias in the world, the ones that are used only
  234. in order to tame the slaves... If the only language you know is
  235. english (poor guy) you could try your luck with the weekly
  236. "Economist"... you'll have to work a lot with it, coz it has been
  237. tailored for the "new riches" of the Tatcher disaster, but you
  238. can (at times) fish something out of it... they do a lot of
  239. idiotic propaganda, but are nevertheless compelled to write some
  240. truth. American newspapers (at least the ones you can get here
  241. in Europe) are absolute shit... one wonders where the hell do the
  242. americans hyde the real information.
  243.   On the "non-capitalistic" side of information there is a
  244. spanish newspaper "El Pais" that seems to know about what's going
  245. on in South America, but it's so full of useless propaganda about
  246. irrelevant Spanish politics that it's not really worth reading.
  247. The monthly "Le Monde diplomatique" offers something too... this
  248. one exaggerates a little on the pauperistic "third world" side,
  249. but has a lot of useful information. See what you can do with all
  250. this information (or disinformation?)
  251.  
  252. [BELIEVE THE COUNTRARY]
  253.      Another good rule of thumb in choosing your medias is the
  254. following... if all medias around you assure, for instance, that
  255. "the Serbians are evil"... the only logical consequence is that
  256. the Serbians are not so evil at all and that "the Croats" or some
  257. other Yugoslavian shits are the real culprits. This does not mean
  258. at all that the Serbians are good, I warn you, it means only what
  259. I say: something is surely hidden behind the concerted propaganda
  260. you hear, the best reaction is to exaggerate in the other
  261. direction and believe the few bit of information that do say the
  262. countrary of the trend. This rule of thumb may be puerile, but
  263. it works somehow most of the time... if somewhere everybody
  264. writes that the commies are bad then THERE the commies must not
  265. be so bad at all and, conversely, if everybody in another place
  266. writes that the commies are all good and nice and perfect (like
  267. the Soviet propaganda did) then THERE the commies are surely not
  268. so good... it's a matter of perspective, much depends on where
  269. you are, i.e. whose interests are really at stake. There is NEVER
  270. real information in this society, only propaganda... if you still
  271. do not believe me do yourself a little experiment... just read
  272. the media description of a past event (say the Vietnam war) as
  273. written AT THE MOMENT of the event and (say) as described 10
  274. years later. You'll quickly realize how untrustworthy all
  275. newspapers and medias are.
  276.  
  277. *    SEMIOTICS You'll have to study it (as soon as you can) to
  278. interpret what they let you believe, in order to get your
  279. bearings. A passing knowledge of ancient RHETORIC can help quite
  280. a lot. Rhetoric is the "Softice" debugger you need to read
  281. through the propaganda medias: concentrate on Periphrasis,
  282. Synecdoche, Antonomasia, Emphasis, Litotes and Hyperbole at the
  283. beginning... you'll later crack higher with Annominatio,
  284. Polyptoton, Isocolon and all the other lovely "figurae
  285. sententiae".
  286.  
  287. Enough, back to software cracking.
  288.  
  289. HOW A REGISTRATION CODE WORKS [WINCAT]
  290.      Let's take as an example for the next crack, a Username-
  291. algebraic registration code, WINCAT Pro, version 3.4., a 1994
  292. shareware program by Mart Heubel. It's a good program, pretty
  293. useful to catalogue the millions of files that you have on all
  294. your cd-roms (and to find them when you need them).
  295. The kind of protection Wincat Pro uses is the most utilized
  296. around: the username string is manipulated with particular
  297. algorithms, and the registration key will be made "ad hoc" and
  298. depends on the name_string. It's a protection incredibly easy to
  299. crack when you learn how the relevant procedures work.
  300.      [WINCAT Pro] is a good choice for cracking studies, coz you
  301. can register "over your registration" one thousand times, and you
  302. can herefore try for this crack different user_names to see all
  303. the algebrical correspondences you may need to understand the
  304. protection code.
  305.      In this program, when you select the option "register", you
  306. get a window where you can input your name and your registration
  307. number (that's what you would get, emailed, after registering
  308. your copy). If you load winice and do your routinely hwnd to
  309. individuate the nag window, and then breakpoint on the
  310. appropriate memory ranges you'll peep in the working of the whole
  311. bazaar (this is completely useless in order to crack these
  312. schemes, but it'll teach you a lot for higher cracking, so you
  313. better do it also with two or three other programs, even if it
  314. is a little boring): a series of routines act on the input (the
  315. name) of the user: the User_name_string (usn). First of all the
  316. usn_length will be calculated (with a REPNZ SCASB and a following
  317. STOSB). Then various routines store and move in memory the usn
  318. and the registration_number (rn) and their relative lengths. In
  319. order to compare their lengths and to check the correct
  320. alphanumeric correspondence between usn and rn, the program first
  321. uppercases the usn and strips all eventual spaces away.
  322.      Here the relevant code (when you see an instruction like
  323. SUB  AL,20 you should immediately realize that you are in a
  324. uppercasing routine, which is important for us, since these are
  325. mostly used for password comparisons)... here the relevant Winice
  326. unassemble and my comments:
  327. 253F:00000260  AC        LODSB          <- get the usn chars
  328. 253F:00000261  08C0      OR   AL,AL     <- check if zero
  329. 253F:00000263  740F      JZ   0274      <- 0: so usn finished
  330. 253F:00000265  3C61      CMP  AL,61     <- x61 is "a", man
  331. 253F:00000267  72F7      JB   0260      <- not a lower, so loop
  332. 253F:00000269  3C7A      CMP  AL,7A     <- x7A is "z", what else?
  333. 253F:0000026B  77F3      JA   0260      <- not a lower, so loop
  334. 253F:0000026D  2C20      SUB  AL,20     <- upper it if it's lower
  335. 253F:0000026F  8844FF    MOV  [SI-01],AL<- and hyde it away
  336. 253F:00000272  EBEC      JMP  0260      <- loop to next char
  337. 253F:00000274  93        XCHG AX,BX
  338. ...
  339. The instruction  MOV [SI-01],AL that you see here is important
  340. at times, coz it points to the location of the "pre-digested"
  341. usn, i.e. the usn formatted as it should be for the number
  342. comparison that will happen later. In some more complicated
  343. protection schemes the reasoning behind this formatting is the
  344. following: "Stupid cracker will never get the relation algorhitm
  345. usn <-> rn, coz he does not know that usn AND rn are slightly
  346. changed before comparing, ah ah... no direct guessing is
  347. possible". Here is only "polishing": you have to "polish" a
  348. string before comparing it in order to concede some mistakes to
  349. the legitimate user (too many spaces in the name, upper-lower
  350. case mismatch, foreign accents in the name etc.) You just need
  351. to know, for now, that this checking is usually still 5 or 6
  352. calls ahead of the real checking (it's what we call a "green
  353. light").
  354.      You should in general realize that the real checking of the
  355. algebrical correspondence follows after a whole series of memory
  356. operations, i.e.: cancelling (and erasing) the previous (if ever)
  357. attempts; reduplicating the usn and the rn somewhere else in
  358. memory; double checking the string lengths (and saving all these
  359. values somewhere... be particularly attentive when you meet stack
  360. pointers (for instance [BP+05]): most of the programs you'll find
  361. have been written in C (what else?). C uses the stack (SS:SP) to
  362. pass parameters or to create local variables for his procedures.
  363. The passwords, in particular, are most of the time compared to
  364. data contained within the stack. If inside a protection a BP
  365. register points to the stack you have most of the time fished
  366. something... remember it pupils: it will spare you hours of
  367. useless cracking inside irrelevant routines. Back to our CATWIN:
  368. another little check is about the "minimal" length allowed for
  369. a user name, in our babe, for instance, the usn must have at
  370. least 6 chars:
  371.      230F:00003483  3D0600    CMP  AX,0006
  372.      230F:00003486  730F      JAE  3497      <- go to nice_name
  373. :too_short
  374.      230F:00003488  BF9245    MOV  DI,4592   <- no good: short
  375.   After a lot of other winicing you'll finally come across
  376. following section of the code:
  377. 2467:00000CA3  B90100    MOV  CX,0001
  378. 2467:00000CA6  03F1      ADD  SI,CX
  379. 2467:00000CA8  2BC1      SUB  AX,CX
  380. 2467:00000CAA  7213      JB   0CBF
  381. 2467:00000CAC  40        INC  AX
  382. 2467:00000CAD  368B4F04  MOV  CX,SS:[BX+04]  <- here
  383. 2467:00000CB1  0BC9      0R   CX,CX
  384. 2467:00000CB3  7D02      JGE  0CB7
  385. 2467:00000CB5  33C9      XOR  CX,CX
  386. 2467:00000CB7  3BC1      CMP  AX,CX
  387. 2467:00000CB9  7606      JBE  0CC1
  388. 2467:00000CBB  8BC1      MOV  AX,CX
  389. 2467:00000CBD  EB02      JMP  0CC1
  390. 2467:00000CBF  33C0      XOR  AX,AX
  391. 2467:00000CC1  AA        STOSB               <- and here
  392. 2467:00000CC2  8BC8      MOV  CX,AX
  393. 2467:00000CC4  F3A4      REPZ MOVSB          <- and here!
  394. 2467:00000CC6  8EDA      MOV  DS,DX
  395. 2467:00000CC8  FC        RETF 0008
  396.  
  397.      This is obviously the last part of the checking routine
  398. (I'll not delve here with the mathematical tampering of it, if
  399. you want to check its workings, by all means, go ahead, it's
  400. quite interesting, albeit such study is NOT necessary to crack
  401. these schemes). The important lines are obviously the MOV
  402. CX,SS:[BX+04], the STOSB and the REPZ MOVSB (as usual in password
  403. protection schemes, you do remember lesson 3, don't you?).
  404.      You should be enough crack-able :=) by now (if you have read
  405. all the precedent lessons of my tutorial), to find out easily,
  406. with these hints, how the working of the protection goes and
  407. where dwells in memory the ECHO of the correct rn (passkey) that
  408. matches the name you typed in. Remember that in these kind of
  409. cracks the ECHO is present somewhere (90% of the cases). There
  410. are obviously one thousand way to find such ECHOs directly,
  411. without going through the verificayions routines... for instance
  412. you could also find them with a couple of well placed
  413. snap_compares, it's a "5 minutes" cracking, once you get the
  414. working of it. I leave you to find, as interesting exercise, the
  415. routine that checks for a "-" inside the rn, a very common
  416. protection element.
  417.   In order to help you understand the working of the protection
  418. code in [Wincat Pro] I'll give you another hint, though: if you
  419. type "+ORC+ORC+ORC" as usn, you'll have to type 38108-37864 as
  420. rn, if you usn as usn "+ORC+ORC" then the relative rn will be
  421. 14055-87593. But these are my personal cracks... I have offered
  422. this information only to let you better explore the mathematical
  423. tampering of this specific program... you'll better see the
  424. snapping mechanism trying them out (going through the routines
  425. inside Winice) alternatively with a correct and with a false
  426. password. Do not crack Wincat with my combination! If you use a
  427. different usn than your own name to crack a program you only show
  428. that you are a miserable lamer... no better than the lamers that
  429. believe to "crack" software using huge lists of serial numbers...
  430. that is really software that they have stolen (Yeah: stolen, not
  431. cracked). You should crack your programs, not steal them...
  432. "Warez_kids" and "serial#_aficionados" are only useless zombies.
  433. I bomb them as soon as I spot them. YOU ARE (gonna be) A CRACKER!
  434. It makes a lot of a difference, believe me.
  435.  
  436. Well, that's it for this lesson, reader. Not all lessons of my
  437. tutorial are on the Web.
  438.      You 'll obtain the missing lessons IF AND ONLY IF you mail
  439. me back (via anon.penet.fi) with some tricks of the trade I may
  440. not know that YOU discovered. Mostly I'll actually know them
  441. already, but if they are really new you'll be given full credit,
  442. and even if they are not, should I judge that you "rediscovered"
  443. them with your work, or that you actually did good work on them,
  444. I'll send you the remaining lessons nevertheless. Your
  445. suggestions and critics on the whole crap I wrote are also
  446. welcomed.
  447.  
  448.      "If you give a man a crack he'll be hungry again
  449.      tomorrow, but if you teach him how to crack, he'll
  450.      never be hungry again"
  451.  
  452.                                 E-mail +ORC
  453.  
  454.                            an526164@anon.penet.fi
  455.